home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Suzy B Software 2
/
Suzy B Software CD-ROM 2 (1994).iso
/
programm
/
prog_a2m
/
fast_txt
/
fast_txt.gfa
(
.txt
)
< prev
Wrap
GFA-BASIC Atari
|
1995-05-02
|
2KB
|
72 lines
' The original FAST TEXT OUTPUT program from "Prog. w/ GFA 3.0" book modified
' to work with medium resoloution. It was _NOT_ modified by me.
'
' This works very well. You first have to call the INIT routine to set things
' up. Then, you can call the PRINT routine and pass it the string you want
' to print onto the screen, followed by the line number you want it placed on.
'
' Please note that this only works on medium resoloutions. Also, refer to the
' above book for some specific information on this routine.
'
' If there are any questions or problems, leave me a note.
'
' -Hagop Janoyan GEnie: H.JANOYAN3
'
@init
FOR i%=0 TO 24
@print("Print on line "+STR$(i%),i%)
NEXT i%
'
> PROCEDURE init
LOCAL xb2%,r%,line%
' ## INLINE:
' $0000: 0c 14 00 00 67 00 00 38 2c 4b 9c 86 1c 1c cc fc
' $0010: 00 08 dd c6 3e 3c 00 07 1a 96 1b 5e 00 02 db fc
' $0020: 00 00 00 a0 51 cf ff f2 9b fc 00 00 04 ff 3e 0d
' $0030: 08 07 00 00 66 00 ff ca 54 4d 60 00 ff c4 4e 75
' 64 Bytes.
INLINE asm_text_color3%,64
'
' ## INLINE:
' $0000: 48 e7 03 1e 26 6f 00 1c 28 6f 00 20 2a 6f 00 24
' $0010: 2e 2f 00 28 ce fc 05 00 2c 2f 00 2c dc 86 dc 87
' $0020: db c6 0c 14 00 00 67 00 00 38 2c 4b 9c 86 1c 1c
' $0030: cc fc 00 08 dd c6 3e 3c 00 07 1a 96 1b 5e 00 02
' $0040: db fc 00 00 00 a0 51 cf ff f2 9b fc 00 00 04 ff
' $0050: 3e 0d 08 07 00 00 66 00 ff ca 54 4d 60 00 ff c4
' $0060: 4c df 78 c0 4e 75
' 102 Bytes.
INLINE ctext_asm%,102
'
xb2%=XBIOS(2)
DIM font%(2048/4) ! Storage space for character set
adr_font%=V:font%(0) ! Address of the character set
a%=adr_font%
' Here is an example of STANDARD text
height%=6
FOR cnt%=0 TO 255
r%=xb2%
TEXT 0,6,CHR$(cnt%)
FOR line%=0 TO 7
POKE a%,PEEK(r%)
ADD r%,160
INC a%
NEXT line%
NEXT cnt%
CLS
RETURN
> PROCEDURE print(print_char$,fast_line%)
LOCAL xb2%
print_char$=print_char$+CHR$(0) ! the asm sub will output text until it finds a 0
adr_string%=V:print_char$ ! Address of the Text String
IF DIM?(reg%())<>0
DIM reg%(16) ! Register array
ENDIF
'
asm_adr#=ctext_asm%
'
xb2%=XBIOS(2)
'
~C:asm_adr#(L:adr_font%,L:adr_string%,L:xb2%,L:fast_line%,L:columns%)
RETURN